#include <accent/utility/tag_functions.hpp>
#include <accent/core.hpp>
#include <type_traits>

using namespace accent;
using namespace accent::support;
using std::is_same;

static_assert(is_same<single_pass_traversal_tag,
                      minimum_tag<single_pass_traversal_tag,
                                  single_pass_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<single_pass_traversal_tag,
                      minimum_tag<single_pass_traversal_tag,
                                  forward_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<single_pass_traversal_tag,
                      minimum_tag<single_pass_traversal_tag,
                                  bidirectional_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<single_pass_traversal_tag,
                      minimum_tag<single_pass_traversal_tag,
                                  random_access_traversal_tag>
                     >::value,
              "bad minimum tag deduction");

static_assert(is_same<single_pass_traversal_tag,
                      minimum_tag<forward_traversal_tag,
                                  single_pass_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<forward_traversal_tag,
                      minimum_tag<forward_traversal_tag,
                                  forward_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<forward_traversal_tag,
                      minimum_tag<forward_traversal_tag,
                                  bidirectional_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<forward_traversal_tag,
                      minimum_tag<forward_traversal_tag,
                                  random_access_traversal_tag>
                     >::value,
              "bad minimum tag deduction");

static_assert(is_same<single_pass_traversal_tag,
                      minimum_tag<bidirectional_traversal_tag,
                                  single_pass_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<forward_traversal_tag,
                      minimum_tag<bidirectional_traversal_tag,
                                  forward_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<bidirectional_traversal_tag,
                      minimum_tag<bidirectional_traversal_tag,
                                  bidirectional_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<bidirectional_traversal_tag,
                      minimum_tag<bidirectional_traversal_tag,
                                  random_access_traversal_tag>
                     >::value,
              "bad minimum tag deduction");

static_assert(is_same<single_pass_traversal_tag,
                      minimum_tag<random_access_traversal_tag,
                                  single_pass_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<forward_traversal_tag,
                      minimum_tag<random_access_traversal_tag,
                                  forward_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<bidirectional_traversal_tag,
                      minimum_tag<random_access_traversal_tag,
                                  bidirectional_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
static_assert(is_same<random_access_traversal_tag,
                      minimum_tag<random_access_traversal_tag,
                                  random_access_traversal_tag>
                     >::value,
              "bad minimum tag deduction");

// Variadic n-minimum

static_assert(is_same<forward_traversal_tag,
                      minimum_tag<forward_traversal_tag>
                     >::value,
              "bad minimum tag deduction");

static_assert(is_same<single_pass_traversal_tag,
                      minimum_tag<random_access_traversal_tag,
                                  forward_traversal_tag,
                                  single_pass_traversal_tag,
                                  forward_traversal_tag,
                                  bidirectional_traversal_tag>
                     >::value,
              "bad minimum tag deduction");
